#!/usr/bin/env bash
# Columnstore Team Use Only
# shellcheck source=/dev/null

### Instructions:
### $ cp .env_example .env
### $ cp .secrets_example .secrets
### Customize the .env file
### Customize the .secrets file
### $ ./build

source .env

MCS_IMAGE_NAME=${MCS_IMAGE_NAME:-mariadb/columnstore}
ENTERPRISE=${ENTERPRISE:-true}
RELEASE_NUMBER=${RELEASE_NUMBER:-10.6}
DEV=${DEV:-false}
MCS_REPO=${MCS_REPO:-Columnstore-Internal-Testing}
MCS_BASEURL=${MCS_BASEURL:-}
CMAPI_REPO=${CMAPI_REPO:-CMAPI-Internal-Testing}
CMAPI_BASEURL=${CMAPI_BASEURL:-}
SPIDER=${SPIDER:-false}

docker build --rm \
    --tag "${MCS_IMAGE_NAME}" \
    --build-arg ENTERPRISE="${ENTERPRISE}" \
    --build-arg RELEASE_NUMBER="${RELEASE_NUMBER}" \
    --build-arg DEV="${DEV}" \
    --build-arg MCS_REPO="${MCS_REPO}" \
    --build-arg MCS_BASEURL="${MCS_BASEURL}" \
    --build-arg CMAPI_REPO="${CMAPI_REPO}" \
    --build-arg CMAPI_BASEURL="${CMAPI_BASEURL}" \
    --build-arg SPIDER="${SPIDER}" .
